package aop;



import org.springframework.stereotype.Component;

@Component
public class UniLibrary extends AbstractLibrary{

    public void getBook() {

        System.out.println("Мы берем книгу из "+ this.getClass().getSimpleName() );
        System.out.println("----------------------------------------------------");
    }

    public String returnBook() {
        int a = 10/0;
        System.out.println("Мы возвращаем книгу в "+ this.getClass().getSimpleName());
        return "Война и Мир";
    }

    void getMagazine() {
        System.out.println("We get journal from "+ this.getClass().getSimpleName());
        System.out.println("----------------------------------------------------");
    }

    public void returnMagazine() {
        System.out.println("We return journal from "+ this.getClass().getSimpleName());
        System.out.println("----------------------------------------------------");
    }

    public void addMagazine() {
        System.out.println("We add journal to "+ this.getClass().getSimpleName());
        System.out.println("----------------------------------------------------");
    }
    public void addBook(String personName, Book book) {
        System.out.println("We add book to "+ this.getClass().getSimpleName());
        System.out.println("----------------------------------------------------");
    }
}
